﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using System.Data;

namespace wRegPadron
{
    public partial class frmReporte : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ifReporte.Attributes["src"] = "http://servicios.munijesusmaria.gob.pe/appweb/appreportes/frmReportTarjeta.aspx?ID=" + Session["CodImpresion"].ToString() + "&Flag=" + Session["FlagAsignado"].ToString();
                /*
                Response.Clear();
                ReportDocument rptImpresion = new ReportDocument();
                rptImpresion = (ReportDocument)Session["Reporte"];
                MemoryStream oStream;
                oStream = (MemoryStream)(rptImpresion.ExportToStream(ExportFormatType.PortableDocFormat));
                rptImpresion.Dispose();
                rptImpresion.Close();
                Response.Clear();
              /*  Response.CacheControl = "Private";
                Response.Expires = -1000;
                Response.Buffer = false;
                Response.CacheControl = "no-cache";
                Response.AddHeader("Pragma", "no-cache");*/
              /*  Response.ContentType = "application/pdf";
                Response.BinaryWrite(oStream.ToArray());
                Response.End();*/
            }
        }
    }
}